package fr.emse.tatiana.replayable.analysis.graph;

import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.XYLayoutEditPolicy;
import org.eclipse.gef.requests.CreateRequest;

public class AppEditLayoutPolicy extends XYLayoutEditPolicy {

	
	@Override
	protected Command createChangeConstraintCommand(EditPart child,
			Object constraint) {
		AbstractLayoutCommand command = new EventChangeLayoutCommand();
		EventGraphPart part = (EventGraphPart) child;
		command.setModel(part.getAnalysis(), part.getModel());
		command.setConstraint((Rectangle) constraint);
		return command;
	}

	@Override
	protected Command getCreateCommand(CreateRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

}
